package bishizhuanyong.滴滴;

import java.util.Arrays;
import java.util.Scanner;

public class main3 {

    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        int[] weights=new int[n];
        long sum=0;
        for (int i=0;i<n;i++) {
            weights[i] = scanner.nextInt();
            sum+= weights[i];
        }
        Arrays.sort(weights);
        long right_sum=0;
        int res=1;
        for (int i= weights.length-1;i>=0;i--){
            long cur=sum-right_sum;
            double averge=(double) cur/(i+1);
            //System.out.println(averge);
            if ((double)weights[i]<=averge*k){
                res=i+1;
                break;
            }
            right_sum+=weights[i];
        }
        System.out.println(res);
    }
}
